<template>

    <!-- 添加或修改对话框 -->
    <lam-dialog :title="title" :visible.sync="open" width="680px" append-to-body @close="cancel">
      <el-form :ref="formRef" :model="form" :rules="rules" label-width="100px" :disabled="formDisabled">
        <el-row>
          <el-col :span="12">
            <el-form-item label="头像" prop="avatar">
              <img :src="form.avatar" width="50"/>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="登录账号" prop="username">
              <span>{{form.username}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="用户昵称" prop="nickName">
              <span>{{form.nickName}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="真实姓名" prop="realname">
              <span>{{form.realname}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="状态" prop="status">
              <span><UserStatus :value="form.status" :text="form.statusDictText" /></span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="绑定手机" prop="phone">
              <span>{{form.phone}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="性别" prop="sex">
              <span>{{form.sexDictText}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="用户编码" prop="userCode">
              <span>{{form.userCode}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="邮箱" prop="email">
              <span>{{form.email}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="生日" prop="birthDate">
              <span>{{form.birthDate}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="用户积分" prop="score">
              <span>{{form.score}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="是否新用户" prop="isNew">
              <span>{{form.isNewDictText}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="注册方式" prop="regType">
              <span>{{form.regTypeDictText}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="注册IP" prop="regIp">
              <span>{{form.regIp}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="注册时间" prop="createTime">
              <span>{{form.createTime}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="修改时间" prop="updateTime">
              <span>{{form.updateTime}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="备注" prop="remark">
              <span>{{form.remark}}</span>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer" style="text-align: center;">
        <el-button @click="cancel">关  闭</el-button>
      </div>
    </lam-dialog>

</template>
<style scoped>
  .el-form-item {
      margin-bottom: 3px;
  }
</style>
<script>
import { EditMixin } from '@/components/mixins/EditMixin';

export default {
  name: "EditUser",
  mixins:[EditMixin],
  data() {
    return {
    };
  },
  created() {
  },
  methods: {
    // 表单重置
    reset() {
      this.form = {
      };
    },

  }
};
</script>
